<?php
// +----------------------------------------------------------------------
// | LIKE [ JUST DO IT ]
// +----------------------------------------------------------------------
// | Author: Mr.hu <huhaiyang7788@163.com>
// +----------------------------------------------------------------------
// | DESC: 定义token接口
// +----------------------------------------------------------------------


namespace common\interfaces;


interface Token
{

    /**
     * 生成token
     * @param null $key
     * return mixed
     * @ Mr.hu.
     */
    public function createToken($secret_key=null);

    /**
     * 验证token的有效性
     * @param $token
     * return mixed
     * @ Mr.hu.
     */
    public function validateToken($token);


    /**
     * 删除对应的token
     * @param $token
     * return mixed
     * @ Mr.hu
     */
    public function delToken($token);

}